package learn;

public class innerclass {
    public static void main(String[] args) {
        method(new Swim() {
            @Override
            public void swimming() {
                System.out.println("你开始游");
            }
        });

        method(
                ()->{
                    System.out.println("我开始游");
                }
        );
    }

    public static void method(Swim s){
        s.swimming();
        s.show();
    }
}

@FunctionalInterface
interface Swim{
    void swimming();
    default void show(){
        System.out.println("所有人开始游");
    }
}
